<aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar Menu -->
      <ul class="sidebar-menu" data-widget="tree">
        <li class="header">HEADER</li>
        <%  var menudata =[{
           index:0,
           icon:"fa fa-file",
           tit:"首页",
           path:"/",
           power:1
          },{
            index:1,
            icon:"fa fa-archive",
            tit:"商品管理",
            path:"/pro",
            power:1,
          },{
            index:2,
            icon:"fa  fa-user",
            tit:"用户管理",
            path:"/user",
            power:0
          },{
            index:3,
            icon:"fa fa-pencil-square-o",
            tit:"订单管理",
            path:"/order",
            power:0
          },{
            index:4,
            icon:"fa fa-file-image-o",
            tit:"banner管理",
            path:"/banner",
            power:1
          },{
            index:5,
            icon:"fa fa-cart-plus",
            tit:"购物车管理",
            path:"/cart",
            power:0
          }] %>
        <!-- Optionally, you can add icons to the links -->
        
        <!-- 设置管理员权限后的代码 -->
        <% for(var i=0;i<menudata.length;i++){ %>
          <% if(power <= menudata[i].power) {%>
              <li class="<%= index===menudata[i].index ? 'active' : '' %>">
                  <a href="<%= menudata[i].path %>">
                      <i class="<%= menudata[i].icon %>"></i>
                      <span><%= menudata[i].tit %></span>
                  </a>
              </li>
          <% } %>
        <% } %>
        <!-- 以下是未做管理员权限的代码 -->
        <!-- <li class="<%= index===0? 'active':'' %>"><a href="/"><i class="fa fa-file"></i> <span>首页</span></a></li> -->
        <!-- <li class="<%= index===1? 'active':'' %>"><a href="/pro"><i class="fa fa-archive"></i> <span>商品管理</span></a></li>
        <li class="<%= index===2? 'active':'' %>"><a href="/user"><i class="fa  fa-user"></i> <span>用户管理</span></a></li>
        <li class="<%= index===3? 'active':'' %>"><a href="/order"><i class="fa fa-pencil-square-o"></i> <span>订单管理</span></a></li>
        <li class="<%= index===4? 'active':'' %>"><a href="/banner"><i class="fa fa-file-image-o"></i> <span>banner管理</span></a></li>
        <li class="<%= index===5? 'active':'' %>"><a href="/cart"><i class="fa  fa-cart-plus"></i> <span>购物车管理</span></a></li> -->
      </ul>
      <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
  </aside>
